package com.example.qimo.repository

import com.example.qimo.data.Bill
import com.example.qimo.data.BillDao
import kotlinx.coroutines.flow.Flow

class BillRepository(private val billDao: BillDao) {
    val allBills: Flow<List<Bill>> = billDao.getAllBills()

    suspend fun insert(bill: Bill) = billDao.insertBill(bill)

    suspend fun update(bill: Bill) = billDao.updateBill(bill)

    suspend fun delete(billId: Int) = billDao.deleteBill(billId)
}
